<form name="form" class="form-horizontal" novalidate ng-submit="form.$valid && vm.save()">
    <div class="modal-header">
        <h4 class="modal-title pod-log-title">回滚</h4>
    </div>
    <div class="modal-body">
        <div>服务 <span ng-style="{{::vm.dpColor}}">{{::vm.dpName}}</span> 将更改当前运行版本</div>
        <div>当前服务版本: <span class="text-info">{{::vm.rsName}}</span></div>
        <div class="form-group margin-top-15 margin-bottom-0" ng-class="{'has-error':(form.version.$touched || form.$submitted ) && form.version.$error.required}">
            <label for="version" class="col-sm-3 control-label">历史版本</label>
            <div class="col-sm-7">
                <select type="text" id="version" name="version" ng-model="vm.version" class="form-control" required
                        ng-options="opt.objectMeta.annotations['deployment.kubernetes.io/revision'] as opt.objectMeta.name for opt in ::vm.oldTable">
                    <option value="">请选择版本</option>
                </select>
                <div class="text-danger" ng-show="(form.version.$touched || form.$submitted ) && form.version.$error.required">请选择版本</div>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" ng-click="vm.save()" ng-disabled="service.loading" class="btn btn-primary btn-sm">
            <i ng-show="vm.loading" class="fa fa-cog fa-lg fa-spin margin-right-5"/>保存
        </button>
        <button ng-click="vm.cancel()" type="button" class="btn btn-default btn-sm">取消</button>
    </div>
</form>